package svc

import (
	"github.com/zeromicro/go-zero/zrpc"
	"origin/api/internal/config"
	"origin/originrpc/originrpcclient"
)

type ServiceContext struct {
	Config    config.Config
	OriginRpc originrpcclient.Originrpc
}

func NewServiceContext(c config.Config) *ServiceContext {
	return &ServiceContext{
		Config:    c,
		OriginRpc: originrpcclient.NewOriginrpc(zrpc.MustNewClient(c.OriginRpc)),
	}
}
